package com.keyue.common.jsr303.annotation;



import com.keyue.common.jsr303.ListValueConstraintValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @date 2023-01-15
 */
@Constraint(validatedBy = {ListValueConstraintValidator.class})
@Documented
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListIntValue {


    // 配置文件中错误提示信息的名称
    String message() default "非法的类型";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    // 自定义值的类型
    int[] enumValue() default {};

    // 是否必填，默认允许为空
    boolean require() default false;
}
